Skip to content

Conversation

@gdaybrice
Copy link

@gdaybrice gdaybrice commented Jan 23, 2026

Summary

  • Add keyCode parameter to injectKeyboardEvent to pass windowsVirtualKeyCode and nativeVirtualKeyCode to CDP
  • Update InputKeyboardMessage interface to include keyCode
  • Pass keyCode from WebSocket message to the keyboard event handler

Problem

Backspace and Delete keys were not working when using the streaming server. CDP's Input.dispatchKeyEvent requires windowsVirtualKeyCode for non-character keys like Backspace (keyCode 8) and Delete (keyCode 46) to function properly.

CDP's Input.dispatchKeyEvent requires windowsVirtualKeyCode for
non-character keys like Backspace (8) and Delete (46) to work properly.

Co-Authored-By: Claude Opus 4.5 <[email protected]>
@vercel
Copy link
Contributor

vercel bot commented Jan 23, 2026

@gdaybrice is attempting to deploy a commit to the Vercel Labs Team on Vercel.

A member of the Team first needs to authorize it.

Copy link
Contributor

@vercel vercel bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Additional Suggestion:

InputKeyboardCommand type is missing keyCode field, causing special keys like Backspace and Delete to fail when keyboard events are sent through the actions protocol

Fix on Vercel

code: params.code,
text: params.text,
windowsVirtualKeyCode: params.keyCode,
nativeVirtualKeyCode: params.keyCode,
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
nativeVirtualKeyCode: params.keyCode,

Incorrectly setting both windowsVirtualKeyCode and nativeVirtualKeyCode to the same Windows key code value, causing keyboard events to not work correctly on non-Windows platforms (macOS, Linux)

Fix on Vercel

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant